package com.powernode.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @create: 2024/7/20
 * @author: gyhe10
 * @description: 读取配置文件中的微信小程序登录所需参数的配置类
 **/

@Data
@AllArgsConstructor
@NoArgsConstructor
@Component
@ConfigurationProperties(prefix = "wx")
@RefreshScope
public class WxParamConfig {
    /**
     * 微信小程序AppID
     */
    private String appid;

    /**
     * 微信小程序AppSecret
     */
    private String secret;

    /**
     * 微信小程序登录凭证校验接口URL
     */
    private String url;

    /**
     * 微信小程序默认登录密码，固定为WECHAT，配置文件中写的是加密后的密文
     */
    private String pwd;
}
